<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改密码</title>
    <link rel="stylesheet" href="../CSS/public-css.css">
    <link rel="stylesheet" href="../CSS/updatePwd-css.css">
</head>
<script src="../js/jquery-3.4.1.min.js"></script>

<body>
<div class="main-div">
    <div class="header-div">
        <div class="logo-div">
            <img src="../img/goktech-img/images/logo.png" alt="无法加载图片">
        </div>
        <div class="form-div">
            <form action="">
                <input type="search" placeholder="热门搜索：干花花瓶">
                <input type="button">
            </form>
        </div>
    </div>
    <div class="body-div">
        <div class="nav-div">
            <ul>
                <li><a href="#">商品首页</a></li>
                <li><a href="#">所有商品</a>
                    <div class="dropdown-content-one">
                        <div class="wrapper">
                            <a href="#">
                                <div class="img-div-one">
                                    <img src="../img/WebProgram/img/nav1.jpg" alt="无法加载图片">
                                </div>
                                <div class="dropdown-text-div">
                                    <span>浓情欧式</span>
                                </div>
                            </a>
                            <a href="#">
                                <div class="img-div-one">
                                    <img src="../img/WebProgram/img/nav2.jpg" alt="无法加载图片">
                                </div>
                                <div class="dropdown-text-div">
                                    <span>浪漫美式</span>
                                </div>
                            </a>
                            <a href="#">
                                <div class="img-div-one">
                                    <img src="../img/WebProgram/img/nav3.jpg" alt="无法加载图片">
                                </div>
                                <div class="dropdown-text-div">
                                    <span>雅致中式</span>
                                </div>
                            </a>
                            <a href="#">
                                <div class="img-div-one">
                                    <img src="../img/WebProgram/img/nav6.jpg" alt="无法加载图片">
                                </div>
                                <div class="dropdown-text-div">
                                    <span>简约现代</span>
                                </div>
                            </a>
                            <a href="#">
                                <div class="img-div-one">
                                    <img src="../img/WebProgram/img/nav5.jpg" alt="无法加载图片">
                                </div>
                                <div class="dropdown-text-div">
                                    <span class="text-span">创意装饰</span>
                                </div>
                            </a>
                        </div>
                    </div>
                </li>
                <li><a href="#">装饰摆件</a></li>
                <li><a href="#">布艺软饰</a></li>
                <li><a href="#">墙饰壁挂</a></li>
                <li><a href="#">蜡艺香薰</a></li>
                <li><a href="#">创意家居</a></li>
            </ul>
        </div>
        <div class="location-div">
            <div class="parcel-div">
                <a href="../homePage.jsp">首页</a>
                <span>&nbsp;&nbsp;/&nbsp;&nbsp;</span>
                <a href="./grxx.jsp">账户管理</a>
                <span>&nbsp;&nbsp;/&nbsp;&nbsp;</span>
                <a href="./updatePwd.jsp">修改密码</a>
            </div>
        </div>
        <div class="wrapper-div">
            <div class="userManage-div">
                <span><a href="${pageContext.request.contextPath}/servlet/userData">用户管理</a></span>
            </div>
            <div class="parcel-div">
                <div class="sideleft">
                    <div class="parcel-div">
                        <div class="head-portrait-div">
                            <img src="../img/goktech-img/images/tx.png" alt="未设置头像">
                        </div>
                        <div class="userInfo-div">
                            <span>${user.uUsername}</span>&nbsp;&nbsp;
                            <span><a href="${pageContext.request.contextPath}/user?method=logout">[退出登录]</a></span>
                        </div>
                    </div>
                    <div class="nav-div">
                        <div class="mydeal-div">
                            <ul>
                                <li><a href="#">我的交易</a></li>
                                <li><a href="./gwc.jsp">我的购物车</a></li>
                                <li><a href="#">我的订单</a></li>
                                <li><a href="#">评价晒单</a></li>
                            </ul>
                        </div>
                        <div class="grzx-div">
                            <ul>
                                <li><a href="#">个人中心</a></li>
                                <li><a href="./grzx.jsp">我的中心</a></li>
                                <li><a href="#">地址管理</a></li>
                            </ul>
                        </div>
                        <div class="accountManage-div">
                            <ul>
                                <li><a href="#">账户管理</a></li>
                                <li><a href="grxx.jsp">个人信息</a></li>
                                <li><a href="#">修改密码</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="sideright">
                    <div class="top-div">
                        <span>修改密码</span>
                    </div>
                    <div class="bottom-div">
                        <div class="parcel-div">
                            <form action="${pageContext.request.contextPath}/user?method=updatePassword" method="post">
                                <div class="parcel-div">
                                    <div class="detail-div">
                                        <span>原密码:</span>
                                        <span>新密码:</span>
                                        <span>确认密码:</span>
                                        <span>验证码:</span>
                                    </div>
                                    <div class="input-div">
                                        <input type="password" class="password" name="password" placeholder="输入原密码">
                                        <div class="pwd-tip">${pwd_tip}</div>
                                        <input type="password" class="newPassword" name="newPassword"
                                               placeholder="6-16 个字符,需使用字母、数字或符号组合">
                                        <div class="newPwd-tip">${newPwd_tip}</div>
                                        <input type="password" class="rePassword" name="rePassword"
                                               placeholder="请再次输入密码">
                                        <div class="rePwd-tip">${rePwd_tip}</div>
                                        <div class="verify-div">
                                            <input id="verify-input" type="text" name="verify" placeholder="请输入验证码">
                                            <img  class="verify" src="${pageContext.request.contextPath}/user?method=creatCode">
                                        </div>
                                        <div class="verify-tip">${verify_tip}</div>
                                    </div>
                                </div>
                                <div class="button-div">
                                    <input type="submit">
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-div">
        <div class="top-div">
            <div class="parcel-div">
                <div class="clearfix">
                    <img src="../img/temp1/foot1.png" alt="无法加载图片">
                    <span>7天无理由退货</span>
                </div>
                <div class="clearfix">
                    <img src="../img/temp1/foot2.png" alt="无法加载图片">
                    <span>15天免费换货</span>
                </div>
                <div class="clearfix">
                    <img src="../img/temp1/foot3.png" alt="无法加载图片">
                    <span>满599包邮</span>
                </div>
                <div class="clearfix">
                    <img src="../img/temp1/foot4.png" alt="无法加载图片">
                    <span>手机特色服务</span>
                </div>
            </div>
        </div>
        <div class="bottom-div">
            <p>最家家居&copy;2013-2017公司版权所有 京ICP备080100-44备0000111000号<br>
                违法和不良信息举报电话:400-800-8200,本网站所列数据,除特殊说明,所有数据均出自我司实验室测试
            </p>
        </div>
    </div>
    <!-- 密码修改成功 -->
    <div class="pwdUpdateSuccess">
        <span>密码修改成功</span>
    </div>
</div>
</body>
<script src="../js/updatePwd-js.js"></script>
<script>
    <c:if test="${sign == 1}">
    window.setTimeout(function () {
        $(".pwdUpdateSuccess").css("display", "block");
        window.setTimeout(function () {
            $(".pwdUpdateSuccess").css("display", "none");
        }, 2000);
    }, 500);
    </c:if>
    $(function () {
        $(".verify").click(function () {
            $(this).attr("src","${pageContext.request.contextPath}/user?method=creatCode&c="+Math.random());
        });
        $(".rePassword").blur(function () {
            if($(this).val()==""){
                $(".rePwd-tip").text("请再次输入密码");
            }else if($(this).val()!=$(".newPassword").val()){
                $(".rePwd-tip").text("密码不一致");
            }else{
                $(".rePwd-tip").text("");
            }
        });
    })
</script>

</html>
